import { createStore } from 'vuex'
// 引入模块
import actions from './actions'
import getters from './getters'
import mutations from './mutations'
import state from './states'
import authModule from './modules/auth'

const store = createStore({
  state,
  mutations,
  actions,
  getters,
  modules: {
    authModule
  }
})
export function setupStore () {
  store.dispatch('authModule/LOAD_LOCAL_DATA')
}
export default store
